package Callable;

public class Callable implements java.util.concurrent.Callable<String> {

    private int n;
    public Callable(int n){
        this.n = n;
    }
    @Override
    public String call() throws Exception {
        int count = 0;
        for (int i = 1; i <= n; i++) {
            count += i;
        }
        return "执行结果为:" + count;
    }
}
